server:
  port: 8080

spring:
  application:
    name: ${model.projectName}-test-web
  security:
    oauth2:
      resourceserver:
        opaquetoken:
          introspection-uri: http://localhost:8080/oauth2/introspect
          client-id: default
          client-secret: default
      client:
        registration:
          default:
            client-id: default
            client-secret: default
            client-authentication-method: client_secret_basic
            authorization-grant-type: client_credentials
            provider: default
        provider:
          default:
            token-uri: http://localhost:8080/oauth2/token
            user-info-uri: http://localhost:8080/auth/test/oidc/userinfo
            user-name-attribute: accountId
            user-info-authentication-method: client_secret_basic
  liquibase:
    enabled: true
    user: ${'$'}{spring.datasource.username}
    password: ${'$'}{spring.datasource.password}
    url: ${'$'}{spring.datasource.url}
    drop-first: false
    change-log: classpath:/db/changelog/init-table.xml
  h2:
    console:
      enabled: true
      path: /h2
      settings:
        trace: true
        web-admin-password: admin
        web-allow-others: true
  shardingsphere:
    datasource:
      names: master_0,slave_0,slave_1
      master_0:
        type: ${'$'}{spring.datasource.type}
        driver-class-name: ${'$'}{spring.datasource.driver-class-name}
        username: ${'$'}{spring.datasource.username}
        password: ${'$'}{spring.datasource.password}
        url: ${'$'}{spring.datasource.url}
      slave_0:
        type: ${'$'}{spring.datasource.type}
        driver-class-name: ${'$'}{spring.datasource.driver-class-name}
        username: ${'$'}{spring.datasource.username}
        password: ${'$'}{spring.datasource.password}
        url: ${'$'}{spring.datasource.url}
      slave_1:
        type: ${'$'}{spring.datasource.type}
        driver-class-name: ${'$'}{spring.datasource.driver-class-name}
        username: ${'$'}{spring.datasource.username}
        password: ${'$'}{spring.datasource.password}
        url: ${'$'}{spring.datasource.url}
    rules:
      readwrite-splitting:
        data-sources:
          readwrite_ds:
            static-strategy:
              write-data-source-name: master_0
              read-data-source-names:
                - slave_0
                - slave_1
            load-balancer-name: round_robin
        load-balancers:
          round_robin:
            type: ROUND_ROBIN
  datasource:
    # 数据库的内容在最后一个连接关闭时丢失。如果要保留内容，必须像这样配置URL
    #url: jdbc:h2:mem:test;MODE=MYSQL;DB_CLOSE_DELAY=-1;AUTO_RECONNECT=TRUE;DB_CLOSE_ON_EXIT=true;database_to_upper=false
    #url: jdbc:h2:mem:test;MODE=MYSQL;DB_CLOSE_ON_EXIT=true;database_to_upper=false
    type: com.zaxxer.hikari.HikariDataSource
    driver-class-name: com.mysql.cj.jdbc.Driver
    username: admin
    password: admin
    url: jdbc:h2:mem:test;MODE=MYSQL;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE;DATABASE_TO_LOWER=TRUE;CASE_INSENSITIVE_IDENTIFIERS=TRUE;NON_KEYWORDS=key,value;
    dynamic:
      enabled: true #启用动态数据源，默认true
      primary: master #设置默认的数据源或者数据源组,默认值即为master
      strict: false #严格匹配数据源,默认false. true未匹配到指定数据源时抛异常,false使用默认数据源
      grace-destroy: false #是否优雅关闭数据源，默认为false，设置为true时，关闭数据源时如果数据源中还存在活跃连接，至多等待10s后强制关闭
      datasource:
        master:
          type: ${'$'}{spring.datasource.type}
          driverClassName: ${'$'}{spring.datasource.driver-class-name}
          username: ${'$'}{spring.datasource.username}
          password: ${'$'}{spring.datasource.password}
          url: ${'$'}{spring.datasource.url}
  cloud:
    openfeign:
      oauth2:
        clientRegistrationId: default
      client:
        config:
          default:
            url: http://localhost:8080
  graphql:
    schema:
      locations: classpath*:graphql/**/

ace:
  security:
    oauth2:
      authorization:
        test:
          enable: true
  application:
    mapping-handler-printer-enable: false
    bean-name-printer-enable: false	
  redis:
    enable: false
  cloud:
    openfeign:
      exclude:
        class-names: .*
  spring-data-jdbc:
    dialect: mysql

jetcache:
  statIntervalMinutes: 0
  areaInCacheName: false
  cacheType: local
  local:
    default:
      type: caffeine
      keyConvertor: jackson
      valueEncoder: java
      valueDecoder: java
      limit: 1000
      expireAfterWriteInMillis: 30000
  remote:
    default:
      type: mock
